package lesson1_20.lesson17;

public enum Sex {
    MALE("男", 1), FEMALE("女", 2);
    private String title;
    private Integer value;

    private Sex(String title, Integer value) {
        this.title = title;
        this.value = value;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    @Override
    public String toString() {
        return "性别：" + this.title + "，编号：" + this.value;
    }
}
